CREATE TABLE Event(
eventID varchar(255) NOT NULL,
eventDate date NOT NULL,
city varchar(255) NOT NULL,
venue varchar(255) NOT NULL
);

-- The following may be added to the CREATE statement
-- Primary Key Syntax (added after field name and NOT NULL)
--     PRIMARY KEY (fieldName)
--          or for compound PK
--     CONSTRAINT PK_compoundFieldName PRIMARY KEY (field1,field2)
-- Foreign Key Syntax (added after field list)
--     FOREIGN KEY (field name) REFERENCES tableName(fieldName)
-- Boolean Field Type
--     For some SQL environments 'bool' may have to be changed to 'int'
-- Text Field Max Size
--     Edit (255) to required length
-- Validation of length of text (added after create statement as new statement
--     CHECK (CHAR_LENGTH(fieldName) > value)
-- Range Check (added after field list)
--     CHECK (fieldName >= value)
--     CHECK (fieldName >= value AND fieldName <= value2)
-- Restricted choice
--     CHECK(fieldName in ('value1','value2','value3')) 

-- Note
-- At N5 Check constraints (that are ignored by a MySQL server) 
-- are being used instead of triggers.

INSERT INTO Event VALUES("Event 1","2024-01-06","Glasgow","Tollcross International Swimming Centre");
INSERT INTO Event VALUES("Event 2","2024-01-13","Leeds","John Charles Centre for Sport");
INSERT INTO Event VALUES("Event 3","2024-01-20","Bangor","Bangor Aurora Aquatic and Leisure Complex");
INSERT INTO Event VALUES("Event 4","2024-01-27","Cardiff","Cardiff International Pool");
